package com.changgou.goods.dao;


import com.changgou.goods.pojo.Brand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BrandMapper extends Mapper<Brand> {

    /**
     * 根据商品分类id查询商品品牌列表
     * @param cid
     * @return
     */
    @Select("SELECT tb.* FROM tb_category_brand cb,tb_brand tb WHERE cb.brand_id=tb.id AND cb.category_id=#{cid}")
    List<Brand> finByCid(@Param("cid") Integer cid);
}
